{extend name='../base/index/main'}

{block name='main'}
<style>
    .search-quote{float:left;width: 100%;}
    .layui-form-item{width:33.33%;float:left;clear: none;}
    .layui-boxs{padding:15px;}
    .layui-elem-quote{padding:10px 0;}
</style>
<div class="layui-layout">
    <fieldset class="layui-elem-field layui-field-title" >
        <legend>搜索</legend>
        <blockquote class="layui-elem-quote search-quote">
            <div class="layui-boxs">
                <form class="layui-form layui-form-pane" action="{:url('Trading/index')}" method="post" lay-filter="search">
        		{:CMaker("relation")->label("业务种类")->helpinfo("")->table("business_categroy")->field("id,bname")->showtype("select")->name('where[business_id]')->render()}
{:CMaker("relation")->label("收支类型")->helpinfo("")->table("trading_type")->field("id,type_name")->showtype("select")->name('where[type_id]')->render()}
{:CMaker("relation")->label("账号类型")->helpinfo("")->table("account_type")->field("id,account_name")->showtype("select")->name('where[account_type_id]')->render()}
{:CMaker("text")->label('账号名称')->name('where[account_name]')->placeholder('请输入搜索的账号名称')->render()}
{:CMaker("relation")->label("交易渠道")->helpinfo("")->table("trading_channel")->field("id,trading_name")->showtype("select")->name('where[channel_id]')->render()}

            <div class="layui-form-item">
                <div class="layui-inline">
                    <div class="layui-input-inline">
                        <button class="layui-btn lay-submit" lay-submit data-type="search_reload_table" table-index="0">
                            <i class="layui-icon">&#xe615;</i> 搜索
                        </button>
                    </div>
                </div>
            </div>
            </form>
            </div>
        </blockquote>
    </fieldset>

    <form class="layui-form layui-form-pane" action="{:url('Trading/index')}" method="post" lay-filter="list-table">
        <blockquote class="layui-elem-quote layui-quote-nm">
            <div class="layui-boxs">
                <button class="layui-btn layui-btn-sm" lay-submit data-url="{:url('Trading/pdel')}" data-call-back="reload_table" table_index="0">
                    批量删除
                </button>
                <!--<a class="layui-btn layui-btn-sm" href="{:url('Trading/export')}" >-->
                    <!--导出excel-->
                <!--</a>-->
                

                <button class="layui-btn layui-btn-sm link" data-type="page" data-url="{:url('Trading/add')}" style="float: right">
                    添加
                </button>
            </div>
        </blockquote>

       {:CMaker("table")->filter("trading")->cols([
['type'=>'checkbox'] ,
['field' => "id",'title' => 'id','sort' => true ],
['field' => "add_time",'title' => '时间','sort' => true],
['field' => 'business_id','title' => '业务种类','sort' => true ] ,
['field' => 'type_id','title' => '收支类型','sort' => true ] ,
['field' => 'money','title' => '金额','sort' => true ] ,
['field' => 'service_money','title' => '手续费','sort' => true ] ,
['field' => 'account_type_id','title' => '账号类型','sort' => true ] ,
['field' => 'account_name','title' => '账号名称','sort' => true ] ,
['field' => 'channel_id','title' => '交易渠道','sort' => true ] ,
['field' => 'remark','title' => '备注','sort' => true ] ,
['field' => 'manager_id','title' => '所属管理员','sort' => true ] ,
['toolbar' => '#actionTpl' ,'title' => '操作','fixed' => 'right']
])->page(true)->even(true)->limit(10)->url('/bill/trading/index.html')->editUrl('/bill/trading/table_edit.html')->render()}

        <script type="text/html" id="actionTpl" lay-filter="defualt">
            <div class="layui-btn-group">
                <span data-url="{:url('Trading/edit')}" data-field="id" class="layui-btn layui-btn-sm" lay-event="edit">编辑</span>
                <span data-url="{:url('Trading/del')}" data-field="id" class="layui-btn layui-btn-sm layui-btn-danger" lay-event="action" confirm-msg="确定删除？" confirm-type="del">删除</span>
            </div>
        </script>



        <blockquote class="layui-elem-quote layui-quote-nm">
            <div class="layui-boxs">
                <button class="layui-btn layui-btn-sm" lay-submit data-url="{:url('Trading/pdel')}" data-call-back="reload_table" table_index="0">
                    批量删除
                </button>
                <!--<a class="layui-btn layui-btn-sm" href="{:url('Trading/export')}" >-->
                    <!--导出excel-->
                <!--</a>-->


                <button class="layui-btn layui-btn-sm link" data-type="page" data-url="{:url('Trading/add')}" style="float: right">
                    添加
                </button>
            </div>
        </blockquote>
    </form>
</div>

<script type="text/javascript" src="__PLUGIN_PATH__/layui/layui.js"></script>
<script type="text/javascript" src="__PLUGIN_PATH__/lay-extend-module/config.js"></script>

{:CMakerJs("all")}

{/block}